package com.lp.biz.operations.model.vo;

import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;
import java.time.LocalDateTime;
import java.util.Set;

import static com.lp.common.constant.CommonConstant.DATE_MIN;
import static com.lp.common.constant.CommonConstant.TIMEZONE;

/**
 * @program: backend
 * @description:
 * @author: Ke.Song
 * @since: 2024-08-06 21:57:48
 */
@Data
public class TaskCreate {

    @NotBlank(message = "主题不能为空")
    private String theme;

    @NotBlank(message = "地点不能为空")
    private String local;

    @NotBlank(message = "活动内容不能为空")
    private String content;

    @NotNull(message = "开始时间不能为空")
    @JsonFormat(timezone = TIMEZONE, pattern = DATE_MIN)
    private LocalDateTime startAt;

    @NotNull(message = "结束时间不能为空")
    @JsonFormat(timezone = TIMEZONE, pattern = DATE_MIN)
    private LocalDateTime endAt;

    @NotEmpty(message = "参与人员不能为空")
    private Set<Integer> memberIds;
}
